<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        let aaa = window.location.search.substr(1)
        let obj = {}
        // name=Kaisa&age=20
        let bbb = aaa.split('&')
        // ['name=Kaisa', 'age=20']
        bbb.forEach((item,index)=>{
            let ddd = item.split('=')
            obj[ddd[0]] = ddd[1]
        })
        console.log(obj)




    </script>
</body>
</html>